From 9e1a3415b773fab5ec57f0f9e972df9881090bfb Mon Sep 17 00:00:00 2001 From: Keir Fraser Date: Mon, 29 Nov 2010 17:44:32 +0000 Subject: [PATCH] x86: fixes after emuirq changes Signed-off-by: Wei Wang --- xen/arch/x86/irq.c | 3 ++- xen/arch/x86/physdev.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/xen/arch/x86/irq.c b/xen/arch/x86/irq.c index fa63de2ab0..3dfe4901e9 100644 --- a/xen/arch/x86/irq.c +++ b/xen/arch/x86/irq.c @@ -1860,7 +1860,8 @@ int unmap_domain_pirq_emuirq(struct domain *d, int pirq) } d->arch.pirq_emuirq[pirq] = IRQ_UNBOUND; - d->arch.emuirq_pirq[emuirq] = IRQ_UNBOUND; + if ( emuirq != IRQ_PT ) + d->arch.emuirq_pirq[emuirq] = IRQ_UNBOUND; done: return ret; diff --git a/xen/arch/x86/physdev.c b/xen/arch/x86/physdev.c index 2913a9c1b7..5e0bbe174b 100644 --- a/xen/arch/x86/physdev.c +++ b/xen/arch/x86/physdev.c @@ -236,7 +236,8 @@ static int physdev_unmap_pirq(struct physdev_unmap_pirq *unmap) spin_lock(&d->event_lock); ret = unmap_domain_pirq_emuirq(d, unmap->pirq); spin_unlock(&d->event_lock); - goto free_domain; + if ( unmap->domid == DOMID_SELF || ret ) + goto free_domain; } ret = -EPERM; -- 2.30.2